<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{$Think.config.LOGIN_PAGE_TITLE}</title>
<link rel="stylesheet" type="text/css" href="{$_RPath}Public/lib/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="{$_RPath}Public/lib/easyui/themes/icon.css">
<script type="text/javascript" src="{$_RPath}Public/lib/easyui/jquery.min.js"></script>
<script type="text/javascript" src="{$_RPath}Public/lib/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="{$_RPath}Public/public.js?v={$srcVer}"></script>
</head>
<body>
    <div id="w" class="easyui-window" title="管理员登录" data-options="iconCls:'icon-man',minimizable:false,closable:false" style="width:300px;height:160px;padding:15px;">
        <form id="loginForm" action="{:U('Public/checkLogin')}" method="post" data-options="novalidate:false">
            <table>
                <tr>
                    <td>用户名：</td>
                    <td><input name="username" class="easyui-textbox" data-options="required:true"></input></td>
                </tr>
                <tr>
                    <td>密&nbsp;&nbsp;码：</td>
                    <td><input name="password" type="password" class="easyui-textbox"data-options="required:true"></input></td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                    <div style="margin-top:10px; text-align:center;">
                    <input type="submit" value="登陆"/>
                    <input type="reset" value="重置" style="margin-left:10px;"/>
                    </div>
                    </td>
                </tr>
            </table>
        </form>
    </div>
	<script type="text/javascript">
        $(function(){
			var loginUrl = "{:U('Public/checkLogin')}";
            $('#loginForm').form({
				onSubmit: function(){
					return $(this).form('enableValidation').form('validate');
				},
                success:function(data){
					if(data == 1){
						window.location = "{:U('Index/index')}"
					}
					if(data == 0) $.messager.alert('温馨提示','登陆出错！', 'info');
					if(data == 2) $.messager.alert('温馨提示','密码错误！', 'info');
					if(data == 3) $.messager.alert('温馨提示','用户名不存在！', 'info');
					
                }
            });
			
		
		
		});

    </script>    
</body>
</html>